﻿using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Util;
using System.ComponentModel;

namespace HX.HxDemo.BOS.Business.PlugIn25011605
{
    [Description("【表单插件】AfterEntryBatchFill"),HotUpdate]
    public class AfterEntryBatchFillFormPlugIn : AbstractDynamicFormPlugIn
    {
        public override void AfterEntryBatchFill(AfterBatchFillEventArgs e)
        {
            base.AfterEntryBatchFill(e);
            var rowCount = this.Model.GetEntryRowCount(e.Entity.Key);
            for(var rowIndex = e.StartRowIndex;rowIndex < rowCount; rowIndex++)
            {
                //修改数据
                var note = "采购数量：" + this.Model.GetValue("FQty", rowIndex);
                this.Model.SetValue("FEntryNote", note, rowIndex);
                //触发服务
                this.View.InvokeFieldUpdateService("FTaxPrice", rowIndex);
            }
        }
    }
}
